```html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Spring与Spring MVC深度解析</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css">
    <link rel="stylesheet" href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            line-height: 1.8;
            color: #333;
        }
        .hero {
            background: linear-gradient(135deg, #6e8efb 0%, #a777e3 100%);
        }
        .hero-title {
            font-family: 'Noto Serif SC', serif;
            text-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        .card {
            transition: all 0.3s ease;
            box-shadow: 0 4px 6px rgba(0,0,0,0.05);
        }
        .card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        }
        .drop-cap::first-letter {
            font-family: 'Noto Serif SC', serif;
            font-size: 4em;
            float: left;
            line-height: 0.8;
            margin-right: 0.1em;
            color: #6e8efb;
            font-weight: 700;
        }
        .divider {
            height: 1px;
            background: linear-gradient(to right, rgba(0,0,0,0), rgba(110,142,251,0.5), rgba(0,0,0,0));
        }
        .timeline-item:not(:last-child):after {
            content: "";
            position: absolute;
            left: 16px;
            top: 30px;
            height: calc(100% - 30px);
            width: 2px;
            background: #e2e8f0;
        }
        .hover-underline {
            position: relative;
        }
        .hover-underline:after {
            content: '';
            position: absolute;
            width: 0;
            height: 2px;
            bottom: -2px;
            left: 0;
            background-color: #6e8efb;
            transition: width 0.3s ease;
        }
        .hover-underline:hover:after {
            width: 100%;
        }
    </style>
</head>
<body class="bg-gray-50">
    <!-- Hero Section -->
    <section class="hero text-white py-20 px-4 md:py-32">
        <div class="container mx-auto max-w-5xl text-center">
            <h1 class="hero-title text-4xl md:text-6xl font-bold mb-6">Spring与Spring MVC深度解析</h1>
            <p class="text-xl md:text-2xl opacity-90 mb-8 max-w-3xl mx-auto">探索两大Java框架的核心差异与协同关系</p>
            <div class="flex justify-center space-x-4">
                <a href="#spring" class="bg-white text-indigo-600 hover:bg-gray-100 px-6 py-3 rounded-full font-medium transition-all duration-300 shadow-md">Spring框架</a>
                <a href="#springmvc" class="bg-transparent border-2 border-white hover:bg-white hover:bg-opacity-20 px-6 py-3 rounded-full font-medium transition-all duration-300">Spring MVC</a>
            </div>
        </div>
    </section>

    <!-- Intro Section -->
    <section class="py-16 px-4">
        <div class="container mx-auto max-w-5xl">
            <div class="bg-white rounded-xl p-8 shadow-lg">
                <p class="drop-cap text-lg md:text-xl leading-relaxed">Spring 和 Spring MVC 是两个紧密相关但具有不同目标和功能的框架。Spring 和 Spring MVC 是互补的，Spring 提供了广泛的企业应用支持，而 Spring MVC 则专注于 Web 应用程序的开发，两者结合起来可以创建高效、可维护的 Java 应用程序。</p>
            </div>
        </div>
    </section>

    <!-- Spring Overview -->
    <section id="spring" class="py-16 px-4 bg-gray-100">
        <div class="container mx-auto max-w-5xl">
            <div class="flex items-center mb-10">
                <div class="bg-indigo-500 w-12 h-12 rounded-full flex items-center justify-center text-white mr-4">
                    <i class="fas fa-leaf text-2xl"></i>
                </div>
                <h2 class="text-3xl font-bold text-gray-800">Spring 框架概述</h2>
            </div>
            
            <div class="grid md:grid-cols-2 gap-8">
                <div class="bg-white rounded-xl p-8 card">
                    <h3 class="text-xl font-bold mb-4 text-indigo-600">核心特性</h3>
                    <ul class="space-y-3">
                        <li class="flex items-start">
                            <i class="fas fa-check-circle text-green-500 mt-1 mr-3"></i>
                            <span>依赖注入(DI)与控制反转(IoC)</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-check-circle text-green-500 mt-1 mr-3"></i>
                            <span>面向切面编程(AOP)支持</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-check-circle text-green-500 mt-1 mr-3"></i>
                            <span>声明式事务管理</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-check-circle text-green-500 mt-1 mr-3"></i>
                            <span>数据访问与持久化支持</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-check-circle text-green-500 mt-1 mr-3"></i>
                            <span>模块化架构设计</span>
                        </li>
                    </ul>
                </div>
                
                <div>
                    <p class="text-lg mb-6"><span class="font-bold text-indigo-600">Spring</span> 是一个全面的企业级应用程序开发框架，它的主要目标是简化 Java 企业应用程序的开发。Spring 提供了一整套解决方案，包括依赖注入（DI）、面向切面编程（AOP）、事务管理、数据访问和持久化等。</p>
                    <p class="text-lg">Spring 的核心功能是基于控制反转（IoC）和依赖注入，这使得对象的创建和管理变得更加灵活和解耦。</p>
                    
                    <div class="mt-8 bg-white rounded-xl p-6 shadow-md">
                        <h4 class="font-bold text-lg mb-3 text-gray-700">Spring模块架构</h4>
                        <div class="mermaid">
                            graph TD
                                A[Spring Core] --> B[Spring AOP]
                                A --> C[Spring Data Access]
                                A --> D[Spring Web]
                                D --> E[Spring MVC]
                                D --> F[Spring WebFlux]
                                C --> G[Spring JDBC]
                                C --> H[Spring ORM]
                                C --> I[Spring Transactions]
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Spring MVC Overview -->
    <section id="springmvc" class="py-16 px-4">
        <div class="container mx-auto max-w-5xl">
            <div class="flex items-center mb-10">
                <div class="bg-purple-500 w-12 h-12 rounded-full flex items-center justify-center text-white mr-4">
                    <i class="fas fa-globe text-2xl"></i>
                </div>
                <h2 class="text-3xl font-bold text-gray-800">Spring MVC 概述</h2>
            </div>
            
            <div class="grid md:grid-cols-2 gap-8">
                <div>
                    <p class="text-lg mb-6"><span class="font-bold text-purple-600">Spring MVC</span> 是 Spring 框架中的一个模块，专门用于创建基于 Java 的 Web 应用程序。它提供了一种模型-视图-控制器（MVC）设计模式来构建 Web 应用程序。</p>
                    <p class="text-lg">Spring MVC 将 Web 应用程序的各个部分分离，使得业务逻辑、视图展示和请求处理可以独立开发和测试，从而提高了应用程序的可维护性和可扩展性。</p>
                    
                    <div class="mt-8 bg-white rounded-xl p-6 shadow-md">
                        <h4 class="font-bold text-lg mb-3 text-gray-700">MVC请求流程</h4>
                        <div class="mermaid">
                            sequenceDiagram
                                participant C as Client
                                participant D as DispatcherServlet
                                participant H as HandlerMapping
                                participant Ctrl as Controller
                                participant V as ViewResolver
                                participant VW as View
                                
                                C->>D: HTTP Request
                                D->>H: 查询处理器
                                H-->>D: 返回Controller
                                D->>Ctrl: 调用方法
                                Ctrl-->>D: 返回ModelAndView
                                D->>V: 解析视图
                                V-->>D: 返回View
                                D->>VW: 渲染视图
                                VW-->>D: 渲染结果
                                D->>C: HTTP Response
                        </div>
                    </div>
                </div>
                
                <div class="bg-white rounded-xl p-8 card">
                    <h3 class="text-xl font-bold mb-4 text-purple-600">关键组件</h3>
                    <ul class="space-y-3">
                        <li class="flex items-start">
                            <i class="fas fa-cog text-purple-500 mt-1 mr-3"></i>
                            <span><strong>DispatcherServlet:</strong> 前端控制器，处理所有请求</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-cog text-purple-500 mt-1 mr-3"></i>
                            <span><strong>HandlerMapping:</strong> 映射请求到处理器</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-cog text-purple-500 mt-1 mr-3"></i>
                            <span><strong>Controller:</strong> 处理业务逻辑</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-cog text-purple-500 mt-1 mr-3"></i>
                            <span><strong>ViewResolver:</strong> 解析视图名称</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-cog text-purple-500 mt-1 mr-3"></i>
                            <span><strong>Model:</strong> 封装业务数据</span>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </section>

    <!-- Relationship Section -->
    <section class="py-16 px-4 bg-gray-100">
        <div class="container mx-auto max-w-5xl">
            <div class="text-center mb-12">
                <h2 class="text-3xl font-bold text-gray-800">Spring 与 Spring MVC 的关系</h2>
                <div class="divider my-6"></div>
            </div>
            
            <div class="grid md:grid-cols-2 gap-8">
                <div class="relative">
                    <div class="timeline-item pl-10 relative">
                        <div class="absolute left-0 top-0 w-8 h-8 bg-indigo-500 rounded-full flex items-center justify-center text-white">
                            <i class="fas fa-layer-group"></i>
                        </div>
                        <div class="bg-white p-6 rounded-lg shadow-md">
                            <h3 class="font-bold text-lg mb-2 text-gray-800">Spring 作为基础</h3>
                            <p class="text-gray-700">Spring 是一个全面的框架，Spring MVC 是其组成部分之一。Spring 提供了所有的基础功能，如 IoC 容器、AOP 支持和事务管理等，而 Spring MVC 依赖于这些基础功能来实现其 Web 层的功能。</p>
                        </div>
                    </div>
                    
                    <div class="timeline-item pl-10 relative mt-8">
                        <div class="absolute left-0 top-0 w-8 h-8 bg-purple-500 rounded-full flex items-center justify-center text-white">
                            <i class="fas fa-puzzle-piece"></i>
                        </div>
                        <div class="bg-white p-6 rounded-lg shadow-md">
                            <h3 class="font-bold text-lg mb-2 text-gray-800">模块化设计</h3>
                            <p class="text-gray-700">Spring 框架是模块化的，包括核心容器、数据访问、事务管理、Web 模块等。Spring MVC 是 Spring 的 Web 模块的一部分，专门用于处理 Web 应用程序中的请求、响应和视图。</p>
                        </div>
                    </div>
                    
                    <div class="timeline-item pl-10 relative mt-8">
                        <div class="absolute left-0 top-0 w-8 h-8 bg-indigo-500 rounded-full flex items-center justify-center text-white">
                            <i class="fas fa-plug"></i>
                        </div>
                        <div class="bg-white p-6 rounded-lg shadow-md">
                            <h3 class="font-bold text-lg mb-2 text-gray-800">集成能力</h3>
                            <p class="text-gray-700">Spring 和 Spring MVC 可以无缝集成。Spring MVC 依赖于 Spring 的 IoC 容器来管理控制器、服务和数据访问对象（DAO）。这使得开发人员可以利用 Spring 的依赖注入和事务管理功能来构建 Web 应用程序。</p>
                        </div>
                    </div>
                </div>
                
                <div class="relative">
                    <div class="timeline-item pl-10 relative">
                        <div class="absolute left-0 top-0 w-8 h-8 bg-purple-500 rounded-full flex items-center justify-center text-white">
                            <i class="fas fa-exchange-alt"></i>
                        </div>
                        <div class="bg-white p-6 rounded-lg shadow-md">
                            <h3 class="font-bold text-lg mb-2 text-gray-800">依赖注入和控制反转</h3>
                            <p class="text-gray-700">Spring MVC 通过 Spring 的 IoC 容器来实现控制反转（IoC）和依赖注入（DI）。这意味着 Spring MVC 中的组件（如控制器和服务）可以通过 Spring 的 IoC 容器进行自动注入和管理，从而提高了组件的解耦性和可测试性。</p>
                        </div>
                    </div>
                    
                    <div class="timeline-item pl-10 relative mt-8">
                        <div class="absolute left-0 top-0 w-8 h-8 bg-indigo-500 rounded-full flex items-center justify-center text-white">
                            <i class="fas fa-eye"></i>
                        </div>
                        <div class="bg-white p-6 rounded-lg shadow-md">
                            <h3 class="font-bold text-lg mb-2 text-gray-800">视图解析</h3>
                            <p class="text-gray-700">Spring MVC 提供了视图解析器的功能，用于将控制器返回的模型数据渲染到视图（如 JSP、Thymeleaf、FreeMarker）中。视图解析器的配置和管理也是通过 Spring 的 IoC 容器来完成的。</p>
                        </div>
                    </div>
                    
                    <div class="timeline-item pl-10 relative mt-8">
                        <div class="absolute left-0 top-0 w-8 h-8 bg-purple-500 rounded-full flex items-center justify-center text-white">
                            <i class="fas fa-tasks"></i>
                        </div>
                        <div class="bg-white p-6 rounded-lg shadow-md">
                            <h3 class="font-bold text-lg mb-2 text-gray-800">事务管理</h3>
                            <p class="text-gray-700">在 Spring MVC 中，事务管理可以通过 Spring 提供的事务管理功能来实现。Spring 提供了声明式事务管理的支持，使得 Web 应用程序中的业务操作可以在事务中进行，从而保证数据的一致性和完整性。</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Comparison Section -->
    <section class="py-16 px-4">
        <div class="container mx-auto max-w-5xl">
            <div class="text-center mb-12">
                <h2 class="text-3xl font-bold text-gray-800">Spring与Spring MVC对比</h2>
                <div class="divider my-6"></div>
            </div>
            
            <div class="bg-white rounded-xl overflow-hidden shadow-lg">
                <table class="min-w-full divide-y divide-gray-200">
                    <thead class="bg-gray-50">
                        <tr>
                            <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">特性</th>
                            <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-indigo-600 uppercase tracking-wider">Spring</th>
                            <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-purple-600 uppercase tracking-wider">Spring MVC</th>
                        </tr>
                    </thead>
                    <tbody class="bg-white divide-y divide-gray-200">
                        <tr>
                            <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">核心功能</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">IoC容器、AOP、事务管理</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Web MVC框架</td>
                        </tr>
                        <tr>
                            <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">设计目标</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">企业应用开发</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Web应用开发</td>
                        </tr>
                        <tr>
                            <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">架构模式</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">无特定模式</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">MVC模式</td>
                        </tr>
                        <tr>
                            <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">依赖关系</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">独立框架</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">依赖于Spring核心</td>
                        </tr>
                        <tr>
                            <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">组件管理</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">管理所有Spring beans</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">管理控制器和Web组件</td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </section>

    <!-- Conclusion Section -->
    <section class="py-16 px-4 bg-gray-900 text-white">
        <div class="container mx-auto max-w-5xl text-center">
            <h2 class="text-3xl font-bold mb-6">Spring与Spring MVC的最佳实践</h2>
            <p class="text-xl mb-8 max-w-3xl mx-auto">在实际项目中，Spring 和 Spring MVC 通常一起使用，Spring 提供后端支持，而 Spring MVC 处理 Web 层交互。这种组合能够创建结构清晰、易于维护的 Java Web 应用程序。</p>
            
            <div class="grid md:grid-cols-3 gap-6 mt-12">
                <div class="bg-gray-800 p-6 rounded-lg">
                    <div class="text-indigo-400 text-4xl mb-4">
                        <i class="fas fa-project-diagram"></i>
                    </div>
                    <h3 class="text-xl font-bold mb-3">清晰的架构分层</h3>
                    <p class="text-gray-300">使用Spring MVC实现清晰的MVC分层，业务逻辑由Spring管理的服务层处理</p>
                </div>
                
                <div class="bg-gray-800 p-6 rounded-lg">
                    <div class="text-purple-400 text-4xl mb-4">
                        <i class="fas fa-code-branch"></i>
                    </div>
                    <h3 class="text-xl font-bold mb-3">依赖注入</h3>
                    <p class="text-gray-300">通过Spring的DI特性，将服务注入控制器，提高可测试性和可维护性</p>
                </div>
                
                <div class="bg-gray-800 p-6 rounded-lg">
                    <div class="text-green-400 text-4xl mb-4">
                        <i class="fas fa-shield-alt"></i>
                    </div>
                    <h3 class="text-xl font-bold mb-3">事务管理</h3>
                    <p class="text-gray-300">利用Spring的声明式事务管理确保Web应用中的数据一致性</p>
                </div>
            </div>
        </div>
    </section>

    <!-- Footer -->
    <footer class="bg-gray-800 text-gray-300 py-8 px-4">
        <div class="container mx-auto max-w-5xl">
            <div class="flex flex-col md:flex-row justify-between items-center">
                <div class="mb-4 md:mb-0">
                    <h3 class="text-xl font-bold text-white hover-underline inline-block">技术小馆</h3>
                </div>
                <div>
                    <a href="http://www.yuque.com/jtostring" class="hover:text-white hover-underline transition-colors duration-300">http://www.yuque.com/jtostring</a>
                </div>
            </div>
        </div>
    </footer>

    <script>
        mermaid.initialize({
            startOnLoad: true,
            theme: 'default',
            flowchart: {
                useMaxWidth: true,
                htmlLabels: true,
                curve: 'basis'
            },
            sequence: {
                diagramMarginX: 50,
                diagramMarginY: 10,
                actorMargin: 50,
                width: 200,
                height: 100
            }
        });
        
        // 平滑滚动
        document.querySelectorAll('a[href^="#"]').forEach(anchor => {
            anchor.addEventListener('click', function (e) {
                e.preventDefault();
                document.querySelector(this.getAttribute('href')).scrollIntoView({
                    behavior: 'smooth'
                });
            });
        });
    </script>
</body>
</html>
```